import Taro, { Component } from '@tarojs/taro'
import { View } from '@tarojs/components'
import {post} from '../../utils/http'

export default class detail extends Component {


  state = {

  }


  render() {
    return (
      <View>
        <View>
          {this.state.address}
        </View>

        <View>
          {/* <image src={this.state.type==="buy"?"/images/buy.png":"/images/sell.png"}} /> */}
          {this.state.type == 'buy' ? '转让' : '求购'}
        </View>


        <View>
          {this.state.message}
        </View>
      </View>
    )
  }

  async componentDidMount(){
    let rs = await post('index.php/trade/get_item', {
      id: this.$router.params.id
    })
    console.log(rs)
    this.setState({
      ...rs.data
    })
  }
}
